#include "../inc/HoughFrame4D.h"

HoughFrame4D::HoughFrame4D()
{
	bot = vcg::Point4f(0,0,0,0);
	top = vcg::Point4f(0,0,0,0);
	middle = vcg::Point4f(0,0,0,0);
	score = 0;
}

HoughFrame4D::HoughFrame4D(vcg::Point4f _bot, vcg::Point4f _top)
{
	bot = _bot;
	top = _top;
        middle =  ( (_bot + _top) / 2 );
	score = 0;
}

HoughFrame4D::HoughFrame4D(vcg::Point4f _bot, vcg::Point4f _top, int _score)
{
	bot = _bot;
	top = _top;
        middle =  ( (_bot + _top) / 2 );
	score = _score;
}

void HoughFrame4D::increment (Circle _circle)
{
	avgCircle.setABR( (score*avgCircle.getA() + _circle.getA()) / score+1,
			  (score*avgCircle.getB() + _circle.getB()) / score+1,
			  (score*avgCircle.getR() + _circle.getR()) / score+1 );
	score++;
}
